<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Medical XPerience</title>
        <style type="text/css">
            body {background-color: #eeeeee; font-size: 12px}
        </style> 
    </h:head>
    <h:body>
        <div align="center">
            <p:layout style="min-width:1020px;max-width:1020px;min-height:800px" >  
                <p:layoutUnit position="north" size="170">  
                    <h:graphicImage url="/images/banner.jpg" />
                </p:layoutUnit>  

                <p:layoutUnit position="west" size="220">  
                    <ui:insert name="menu">
                        <h:form>
                        <p:growl id="messages"/>
                            <p:menu style="width: 200px">
                                <p:submenu label="Appointments">
                                    <p:menuitem value="New Appointment" action="newAppointment" icon="ui-icon-document" />
                                    <p:menuitem value="List Appointments" action="appointmentList" icon="ui-icon-contact" />  
                                    <p:menuitem value="Schedule" action="#{scheduleController.refreshSchedule()}" icon="ui-icon-calendar" ajax="false"/>
                                </p:submenu>
                                <p:submenu label="Patients">
                                	<p:menuitem value="New Patient" action="#{patientController.newPatientScreen()}" icon="ui-icon-document"/>
                                	<p:menuitem value="List Patients" action="patientList" icon="ui-icon-contact"/>
                                </p:submenu>
                                <p:submenu label="Admin">
                                    <p:menuitem value="Users" action="userList" icon="ui-icon-person"/>
                                	<p:menuitem value="Medicines" icon="ui-icon-gear"/>
                                	<p:menuitem value="Diseases" icon="ui-icon-gear"/>
                                	<p:menuitem value="Symptoms" icon="ui-icon-gear"/>
                                	<p:menuitem value="Prescriptions" icon="ui-icon-gear"/>
                                </p:submenu>
                                	<p:menuitem value="Logout" action="#{loginController.logout(loginController)}" update="messages" icon="ui-icon-circle-close"/>
                            </p:menu>
                        </h:form>
                    </ui:insert>
                </p:layoutUnit>  
                <p:layoutUnit position="center">  
                    <ui:insert name="main">
                        Main of the page
                    </ui:insert>
                </p:layoutUnit>
                
                <p:layoutUnit position="south">
                	<ui:insert name="footer">
                		<h:outputText value="You are logged as: " />
                		<h:outputText value="#{loginController.user.user}" /><br/>
                	</ui:insert>
                	<ui:insert name="credits">
                		<h:outputText value="Developed by Ricardo Reimao" />
                	</ui:insert>
                </p:layoutUnit>  
            </p:layout>  
        </div>
    </h:body>
</html>
